package org.chnxi.study.springcloud.dubbo.storage.controller;

import org.dromara.soul.client.springcloud.annotation.SoulSpringCloudClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SoulSpringCloudClient(path = "/storage")
public class StorageController {

    @GetMapping("/storage/test")
    @SoulSpringCloudClient(path = "/test", desc = "spring cloud 测试")
    public String test(){
        if(System.currentTimeMillis()%2==0){
            throw new RuntimeException("MyException");
        }
        return "ok-8001";
    }

}
